@csrf
<div class="layui-row">
    <div class="layui-col-md6">
        <div class="layui-form-item">
            <label for="name" class="layui-form-label">名称</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="name" value="{{$lesson->name??''}}">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="tag" class="layui-form-label">标签</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="tag" value="{{$lesson->tag??''}}">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="period" class="layui-form-label">课时</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="period" value="{{$lesson->period??''}}">
            </div>
        </div>
    </div>
    <div class="layui-col-md6">
        <div class="layui-form-item">
            <label for="price" class="layui-form-label">课程价格</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="price" value="{{$lesson->price??''}}">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="category_id" class="layui-form-label">课程分类</label>
            <div class="layui-input-block">
                <select name="category_id" class="layui-select">
                    @foreach ($categories as $item)
                    <option value="{{$item->id}}" {{$lesson->category_id==$item->id?'checked':''}}>{{$item->name}}
                    </option>
                    @endforeach
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label for="class_location" class="layui-form-label">上课地点</label>
            <div class="layui-input-block">
                <input type="text" class="layui-input" name="class_location" value="{{$lesson->class_location??''}}">
            </div>
        </div>
    </div>
</div>


<div class="layui-form-item">
    <label for="image" class="layui-form-label">课程图片</label>
    <div class="layui-input-block">
        <input type="hidden" class="layui-input" name="image" value="{{$lesson->image??''}}">
    </div>
</div>
<div class="layui-form-item">
    <label for="introduction" class="layui-form-label">课程简介</label>
    <div class="layui-input-block">
        <textarea class="layui-textarea" name="introduction">
            {{$lesson->introduction??''}}
        </textarea>
    </div>
</div>
<div class="layui-form-item">
    <label for="detail" class="layui-form-label">课程详情</label>
    <div class="layui-input-block">
        <textarea class="layui-textarea" name="detail">
            {{$lesson->detail??''}}
        </textarea>
    </div>
</div>
<div class="layui-form-item">
    <label for="harvest" class="layui-form-label">课程收获</label>
    <div class="layui-input-block">
        <textarea class="layui-textarea" name="harvest">
            {{$lesson->harvest??''}}
        </textarea>
    </div>
</div>
<div class="layui-form-item">
    <label for="schedule" class="layui-form-label">课程安排</label>
    <div class="layui-input-block">
        <textarea class="layui-textarea" name="schedule">
            {{$lesson->schedule??''}}
        </textarea>
    </div>
</div>
<div class="layui-form-item">
    <label for="suitable" class="layui-form-label">适合人群</label>
    <div class="layui-input-block">
        <textarea class="layui-textarea" name="suitable">
            {{$lesson->suitable??''}}
        </textarea>
    </div>
</div>
<div class="layui-form-item">
    <label for="recommended_mentors" class="layui-form-label">推荐导师(逗号分隔)</label>
    <div class="layui-input-block">
        <textarea class="layui-textarea" name="recommended_mentors">
            {{$lesson->recommended_mentors??''}}
        </textarea>
    </div>
</div>
